package com.zjz.pojo;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

// 等价于  <bean id="user" class="com.zjz.pojo.User"/>
 // @Component 组件
@Component
@Scope("singleton")
public class User {

    /*
    *     <bean id="user" class="com.zjz.pojo.User">
    *        <property name="name" value="zjz"></property>
    *   </bean>
    * */

    @Value("zjz")
    public String name;
}
